const { compose, curry } = require('folktale/core/lambda')
const { toUpper, first } = require('lodash')

// 第一个参数代表后面需要传入多少个参数
let fn = curry(3, (x, y, z) => {
  return x + y + z
})

console.log(fn(1, 2, 3))
console.log(fn(1, 2)(3))
console.log(fn(1)(2, 3))

let fn2 = compose(toUpper, first)

console.log(fn2(['a', 'b']))